macro(CCTAG_CHECK_NVCC_COMPILER_FLAG _FLAG _RESULT)
    execute_process(COMMAND ${CUDA_NVCC_EXECUTABLE} "${_FLAG}" ERROR_VARIABLE NVCC_OUT)
    if("${NVCC_OUT}" MATCHES "Unknown option")
        set(${_RESULT} 0)
    else()
        if("${NVCC_OUT}" MATCHES "deprecated")
            set(${_RESULT} 0)
	else()
            set(${_RESULT} 1)
	endif()
    endif()
endmacro()
